<%@ page  contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<script language="javascript">
  function clear_rinfo()
  {
	  $.CurrentNavtab.find('#uname').val("");
  }
</script>
<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${pageContext.request.contextPath}/role/select.do" method="post">
        <div class="bjui-searchBar clearfix">
        	<button class="btn-default" data-icon="plus" data-url="${pageContext.request.contextPath}/role/add.do"
				data-toggle="navtab" data-id="role-add-tab" data-title="新建角色">添加</button>
			<div class="search-group">         
			<input type="hidden" name="pageSize" value="${pagePara.pageSize }"/>
			<input type="hidden" name="pageIndex" value="${pagePara.pageIndex }"/>
	             <label>名称	：</label>
	            <input type="text"  name="uname" id="uname" size="10" value="${role.uname}"> 
	            <button type="submit" class="btn-default" data-icon="refresh">搜索</button>
	            <button type="button" class="btn-default" data-icon="refresh" onclick="clear_rinfo()">清空</button>
            </div>
        </div>
    </form>	
</div>
	<div class="bjui-pageContent tableContent">
	    <table data-toggle="tablefixed" class="table table-bordered table-hover table-striped table-top center" data-width="100%">
	    	<thead>
				<tr>
					<th width="25%">系统编号</th>
					<th width="35%">角色名称</th>	
					<th width="32%">角色备注</th>							
				    <th width="8%">操作</th>
				</tr>
	    	</thead>
	    	<tbody>
	    	<c:forEach var="rl" varStatus="status" items="${list}">
	    	<tr>
			    		<td>${rl.ucode}</td>
						<td>${rl.uname}</td>	
						<td>${rl.memo}</td>						
	    		<td>
    				  <a href="<%=request.getContextPath()%>/role/edit.do?ucode=${rl.ucode}" 
    				  class="btn btn-green" data-toggle="navtab" data-width="500" data-height="500" 
    				  data-id="dialog-mask" data-title="修改角色信息" data-mask="true">修改</a>
    				  <span class="btn-sep"></span>
    				  <a href="<%=request.getContextPath()%>/role/selectAuth.do?ucode=${rl.ucode}" 
    				  class="btn btn-green" data-toggle="navtab" data-width="500" data-height="500" 
    				  data-id="dialog-mask" data-title="修改${rl.uname}权限" data-mask="true">系统权限</a>
    				  <span class="btn-sep"></span>
    				 <a href="<%=request.getContextPath()%>/role/delete.do?ucode=${rl.ucode}" 
	    		    	class="btn btn-green" data-toggle="doajax" data-confirm-msg="确定要删除吗？">删除</a>
	    		</td>
	    	</tr>
	    	</c:forEach>
	    	</tbody>
	    </table>
	</div>
	<div class="bjui-pageFooter">
    <div class="pages">
        
        <span>&nbsp;共 ${pagePara.total } 条</span>
    </div>
    <div class="pagination-box pull-left" data-toggle="pagination" data-total=" ${pagePara.total }" data-page-size=" ${pagePara.pageSize}" data-page-current="${pagePara.pageIndex}"></div>
</div>